#pragma once

#include <QWidget>
#include "ui_boxWindow.h"
#include "modelSoft.h"

QT_BEGIN_NAMESPACE
namespace Ui { class boxWindowClass; };
QT_END_NAMESPACE

class boxWindow : public QWidget
{
	Q_OBJECT

public:
	boxWindow(modelSoft* myModelSoft, CubeFeature* m_cubeFeature,QWidget *parent = nullptr);
	~boxWindow();
	double get_box_length();
	double get_box_width();
	double get_box_high();
	

private slots:
	void makeBox_onClick();
	

protected:
	void createConnections();
	virtual void closeEvent(QCloseEvent* event) override;
	void receivePos(const TopoDS_Shape& shape);
	void onClickVertexSelect();
	void onLengthChanged();
	void onWidthChanged();
	void onHighChanged();


private:
	Ui::boxWindowClass *ui;
	modelSoft* myModelSoft;
	gp_Pnt point_pos = gp_Pnt(0,0,0);
	Standard_Integer shapeID;
	CubeFeature* cubeFeature;
	//�����޸�ǰ�Ĳ���
	CubeFeature* beforeFeature = new CubeFeature();
	bool confirmCreate = false;
	Handle(QIVtkSelectionPipeline) cubePipeline;
	//��ʷ�����ѡ��ʱ��ʱ��ʾ��ʼ���ؽ�ģ
	CubeFeature* feature = new CubeFeature();
	Handle(QIVtkSelectionPipeline) cubeTemPipeline;
};
